//
// Created by Administrator on 2022/11/8.
//
#include "http_multi_io.h"
void pipe_read_fd_handler(event_container_t *ec, event_p_t* e_param) {
    char buf[2] = {0};
    readPipe(ec->pipefd[0], buf);
}
int s_add_event(struct event_container_s *ev_container, pthread_mutex_t *lock, int fd, uint32_t event, fd_callback_handler_func fd_handler, void *args, int n){
    int rc;
    mutex_lock(lock);
    rc = add_event(ev_container, fd, event, fd_handler, args, n);
    mutex_unlock(lock);
    return rc;
}
int s_del_event(struct event_container_s *ev_container, pthread_mutex_t *lock, int fd, uint32_t event){
    int rc;
    mutex_lock(lock);
    rc = del_event(ev_container, fd, event);
    mutex_unlock(lock);
    return rc;
}